package com.ease.framework.gef4p.model {
   import com.ease.util.collections.HashMap;
   import com.ease.util.collections.Map;
   import com.ease.common.models.Model;
   import com.ease.framework.gef.events.ModelEvent;

   public class PModel extends Model {

      private var _id:String = "";
      private var _name:String = "";
      public var desc:String = "";
      public var type:String = "";

      public function PModel() {
         super();

         ModelInstanceCache.addModel(this);
      }

      public function get id():String {
         return _id;
      }

      public function set id(value:String):void {
         var valueMap:Map = new HashMap();
         valueMap.put("id", _id);

         _id = value;

         dispatchEvent(new ModelEvent(ModelEvent.ModelEvent_CHANGED, this, valueMap));
      }

      public function set name(value:String):void {
         _name = value;
      }

      [Bindable]
      public function get name():String {
         return _name;
      }

   }
}